# 定义诗歌内容
poem = {
    "title": "贺《竟陵新韵》创刊（新韵）",
    "author": "张军",
    "lines": [
        "竟陵喜庆紫云开，新韵创刊编撰来。",
        "曲赋诗词歌盛世，翰墨文章扫尘埃。",
        "唐朝陆羽心田润，明代钟惺艺苑栽。",
        "国粹弘扬铺锦绣，期期别具展高才。"
    ]
}

# 计算最长行长度，用于居中对齐
max_line_length = max(len(line) for line in poem["lines"])
title_length = len(poem["title"])
author_line = f"作者：{poem['author']}"

# 诗歌格式输出
print(" " * (max_line_length + 4))  # 装饰线
print(f"  {poem['title'].center(max_line_length)}  ")  # 标题居中
print(f"  {author_line.center(max_line_length)}  ")      # 作者居中
print(" " * (max_line_length + 4))  # 分隔线

# 输出每句诗，左右各留两个空格
for line in poem["lines"]:
    print(f"  {line}  ")

print(" " * (max_line_length + 4))  # 装饰线

# 另一种格式：传统竖排风格的横排模拟
print("\n\n【传统风格呈现】")
print(" " * 10 + " " * len(poem["title"]))
print(" " * 10 + poem["title"])
print(" " * 10 + f"作者：{poem['author']}")
print(" " * 10 + " " * len(poem["title"]))
for i, line in enumerate(poem["lines"], 1):
    print(f"   {line}")
print(" " * 10 + " " * len(poem["title"]))
    